unit u_rel_cliente_categoria;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, u_rel_padrao, RLPDFFilter, RLHTMLFilter, RLRichFilter,
  RLFilters, RLXLSFilter, jpeg, RLReport, FMTBcd, DB, RLParser, DBClient,
  Provider, SqlExpr;

type
  TFRM_RelClienteCategoria = class(TFRM_RelPadrao)
    RLBand18: TRLBand;
    RLLabel43: TRLLabel;
    RLLabel45: TRLLabel;
    RLLabel47: TRLLabel;
    RLLabel2: TRLLabel;
    RLLabel1: TRLLabel;
    bndDetail: TRLBand;
    RLDBText13: TRLDBText;
    RLDBText21: TRLDBText;
    RLDBText27: TRLDBText;
    RLDBText15: TRLDBText;
    RLDBText1: TRLDBText;
    RLBand12: TRLBand;
    RLDBResult7: TRLDBResult;
    sqlRelatorio: TSQLQuery;
    dspRelatorio: TDataSetProvider;
    cdsRelatorio: TClientDataSet;
    dsRelatorio: TDataSource;
    RLExpressionParser: TRLExpressionParser;
    cdsRelatorioCOD_CATEGORIA: TIntegerField;
    cdsRelatorioDESCRICAO: TStringField;
    cdsRelatorioDATA_CAD: TDateField;
    cdsRelatorioDATA_ALTERACAO: TDateField;
    procedure lblEmpresaLicenciadaBeforePrint(Sender: TObject;
      var Text: String; var PrintIt: Boolean);
    procedure bndDetailBeforePrint(Sender: TObject; var PrintIt: Boolean);
    procedure RLDBResult7BeforePrint(Sender: TObject; var Text: String;
      var PrintIt: Boolean);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FRM_RelClienteCategoria: TFRM_RelClienteCategoria;

implementation

uses u_dm_geral;

{$R *.dfm}

procedure TFRM_RelClienteCategoria.lblEmpresaLicenciadaBeforePrint(
  Sender: TObject; var Text: String; var PrintIt: Boolean);
begin
  inherited;
  Text := dmGeral.cdsConsultaEmpUserDESCRICAO_MULTIEMPRESA.AsString;
end;

procedure TFRM_RelClienteCategoria.bndDetailBeforePrint(Sender: TObject;
  var PrintIt: Boolean);
begin
  inherited;
  if odd(dsRelatorio.DataSet.RecNo) then bndDetail.Color := $00F5F5F5 else bndDetail.Color := clWhite;
end;

procedure TFRM_RelClienteCategoria.RLDBResult7BeforePrint(Sender: TObject;
  var Text: String; var PrintIt: Boolean);
begin
  inherited;
  Text := Text +' categorias';
end;

procedure TFRM_RelClienteCategoria.FormCreate(Sender: TObject);
begin
  inherited;
  Screen.Cursor := crSQLWait;
  cdsRelatorio.Close;
  cdsRelatorio.Open;
  Screen.Cursor := crDefault;
end;

end.
